<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditVendaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditVendaLabel_idVenda}" for="idVenda" />
                    <h:inputText id="idVenda" value="#{vendaController.selected.idVenda}" title="#{bundle.EditVendaTitle_idVenda}" required="true" requiredMessage="#{bundle.EditVendaRequiredMessage_idVenda}"/>
                    <h:outputLabel value="#{bundle.EditVendaLabel_almoxarifadoidAlmoxarifado}" for="almoxarifadoidAlmoxarifado" />
                    <h:inputText id="almoxarifadoidAlmoxarifado" value="#{vendaController.selected.almoxarifadoidAlmoxarifado}" title="#{bundle.EditVendaTitle_almoxarifadoidAlmoxarifado}" required="true" requiredMessage="#{bundle.EditVendaRequiredMessage_almoxarifadoidAlmoxarifado}"/>
                    <h:outputLabel value="#{bundle.EditVendaLabel_data}" for="data" />
                    <h:inputText id="data" value="#{vendaController.selected.data}" title="#{bundle.EditVendaTitle_data}" required="true" requiredMessage="#{bundle.EditVendaRequiredMessage_data}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditVendaLabel_valorTotal}" for="valorTotal" />
                    <h:inputText id="valorTotal" value="#{vendaController.selected.valorTotal}" title="#{bundle.EditVendaTitle_valorTotal}" required="true" requiredMessage="#{bundle.EditVendaRequiredMessage_valorTotal}"/>
                </h:panelGrid>
                <h:commandLink action="#{vendaController.update}" value="#{bundle.EditVendaSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditVendaViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{vendaController.prepareList}" value="#{bundle.EditVendaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditVendaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
